package com.example.bookdemo.service;

import com.example.bookdemo.dao.UserInfoMapper;
import com.example.bookdemo.model.UserInfo;
import com.example.bookdemo.model.bookInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    @Autowired
    private UserInfoMapper userInfoMapper;
    //返回调用信息
    public UserInfo passwordGet(String userName){
        return userInfoMapper.passwordGetByName(userName);
    }


    public Integer registerInfo(UserInfo userInfo) {
        return userInfoMapper.addUser(userInfo);
    }

    public UserInfo selectUserInfo(Integer userId) {
        return userInfoMapper.selectUserInfo(userId);
    }

    public Integer updateUserInfo(UserInfo userInfo) {
        return userInfoMapper.updateUserInfo(userInfo);
    }
}
